<script setup>
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

onMounted(() => {
  // 如果当前路径是根路径，重定向到登录页
  if (router.currentRoute.value.path === '/') {
    router.push('/login')
  }
})
</script>

<template>
  <router-view></router-view>
</template>
